Skip to content

FEAT: add benchmark-owned adversarial prompts - #2494

Open
hannahwestra25 wants to merge 22 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25-scenario-adversarial-system-prompt
Open

FEAT: add benchmark-owned adversarial prompts#2494
hannahwestra25 wants to merge 22 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25-scenario-adversarial-system-prompt

Conversation

@hannahwestra25

@hannahwestra25 hannahwestra25 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What changed

AdversarialBenchmark now prepends one benchmark-owned static guidance string to the native adversarial system prompt of every selected compatible attack technique, including explicitly selected techniques such as red_teaming.

The guidance is forwarded at AttackTechniqueFactory.create(...) time through MatrixAtomicAttackBuilder, so globally registered factories and canonical prompt files remain unchanged. Only the created attack technique is specialized. The native prompt retains its template parameters, response schema, data type, and response format, while the final composed prompt participates in attack identity.

Simulated-conversation techniques retain their existing path-backed prompt configuration. The optional string prefix is stored in the existing JSON-backed seed value, so legacy records remain compatible and no database migration is required.

The default techniques remain role_play_video_game, crescendo_simulated, and tap. The scenario version is bumped to 5 because the guidance changes benchmark behavior.

Testing

  • 596 broad affected tests passed after simplifying to a string prefix
  • Final factory, matrix-builder, benchmark, and prompt-config suites: 196 passed after the create-time refinement and latest main merge
  • Ruff format and lint pass
  • Type checking passes
  • Memory migration, async suffix, documentation, and Jupytext checks pass

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545c2d8d-1fe9-451d-a8bc-da23e19b3737
Replace the user-supplied prompt override with scenario-local prompt variants for the benchmark's role-play, simulated Crescendo, and TAP techniques.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545c2d8d-1fe9-451d-a8bc-da23e19b3737
@hannahwestra25
hannahwestra25 force-pushed the hannahwestra25-scenario-adversarial-system-prompt branch from 62452c8 to 84be7c0 Compare August 25, 2026 21:09
@hannahwestra25 hannahwestra25 changed the title [DRAFT] FEAT: allow custom adversarial benchmark prompts [DRAFT] FEAT: add benchmark-owned adversarial prompts Aug 25, 2026
Adapt the supplied single-turn and multi-turn prompts to the adversarial_chat schema and prepend them to the corresponding benchmark technique prompts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545c2d8d-1fe9-451d-a8bc-da23e19b3737
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545c2d8d-1fe9-451d-a8bc-da23e19b3737
@hannahwestra25 hannahwestra25 changed the title [DRAFT] FEAT: add benchmark-owned adversarial prompts [DRAFT] FEAT: compose benchmark adversarial prompts Aug 25, 2026
@hannahwestra25 hannahwestra25 changed the title [DRAFT] FEAT: compose benchmark adversarial prompts [DRAFT] FEAT: add benchmark-owned adversarial prompts Aug 26, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545c2d8d-1fe9-451d-a8bc-da23e19b3737
@hannahwestra25 hannahwestra25 changed the title [DRAFT] FEAT: add benchmark-owned adversarial prompts [DRAFT] FEAT: compose benchmark adversarial prompts Aug 26, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545c2d8d-1fe9-451d-a8bc-da23e19b3737
@hannahwestra25 hannahwestra25 changed the title [DRAFT] FEAT: compose benchmark adversarial prompts [DRAFT] FEAT: add benchmark-owned adversarial prompts Aug 26, 2026
@hannahwestra25 hannahwestra25 changed the title [DRAFT] FEAT: add benchmark-owned adversarial prompts FEAT: add benchmark-owned adversarial prompts Aug 26, 2026
@hannahwestra25
hannahwestra25 marked this pull request as ready for review August 26, 2026 16:39
@@ -0,0 +1,84 @@
name: adversarial_benchmark_crescendo_simulated
description: |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proposed next step : #2503

hannahwestra25 and others added 7 commits September 3, 2026 12:21
Merge current origin/main and replace duplicated benchmark prompts with a shared guidance layer composed over canonical technique prompts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply static benchmark guidance to every selected adversarial factory through scenario-local copies while preserving native prompts and legacy path-backed seeds.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 86af64f1-e02f-45f9-9cc8-15325ab1644e
Use a single static string prefix across attack and simulated-conversation configuration while preserving generic benchmark layering and identity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 86af64f1-e02f-45f9-9cc8-15325ab1644e
Forward the static prefix through MatrixAtomicAttackBuilder and specialize only the created AttackTechnique, avoiding copied factory state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 86af64f1-e02f-45f9-9cc8-15325ab1644e
Pass one static prefix through the matrix builder and specialize only the created attack technique, avoiding copied factory state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 86af64f1-e02f-45f9-9cc8-15325ab1644e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant